<template>
    <div class="goDescBox">
        <h3 class="godescTitle"> {{godesc.title}} </h3>
        <hr>
        <div class="DescComment" v-html="godesc.content"></div>
    </div>
</template>

<script>
import {Toast} from "mint-ui"
export default {
    data(){
        return{
            id:this.$route.params.id,
            godesc:{}  //用于存储数据 
        }
    },
    created(){
        this.getGoDesc()
    },
    methods: {
        getGoDesc(){
            this.$http.get("api/goods/getdesc/" + this.id).then(result=>{
                if(result.body.status==0){
                    this.godesc=result.body.message[0]
                } else{
                    Toast("获取数据失败")
                }
            })
        }
    },
}
</script>


<style lang="less">
.goDescBox{
    text-align: center;
    padding: 0 10px;
    .DescComment{
        p{
            img{
                width: 100%;
                height: 100%;
            }
        }
        table{
            tr{
                display: block;
                text-align: left;
                img{
                width: 100%;
                height: 100%;
            }
                td{
                width: 750px;
                
            }
            }
        }
        
    }
    .godescTitle{
        color: #4455ff;
        font-size: 18px;
        line-height: 50px;
    }
}
  
</style>